flat Map
inline fun <L, R, T> Either<L, R>.flatMap(transform: (R) -> Either<L, T>): Either<L, T>
Content copied to clipboard
Maps value of this Right to a new Either using transform.
Return
Either mapped using transform or this object if this is a Left.
Since
1.3
Parameters
inline fun <L, R, T> LeftProjection<L, R>.flatMap(transform: (L) -> Either<T, R>): Either<T, R>
Content copied to clipboard
Maps value of this Left to a new Either using transform.
Return
Either mapped using transform or this object if this is a Right.
Parameters
inline fun <L, R, T> RightProjection<L, R>.flatMap(transform: (R) -> Either<L, T>): Either<L, T>
Content copied to clipboard
Maps value of this Right to a new Either using transform.
Return
Either mapped using transform or this object if this is a Left.